|
The C preprocessor or cpp is the macro preprocessor for the C and C++ computer programming languages. The preprocessor provides the ability for the inclusion of header files, macro expansions, conditional compilation, and line control. In many C implementations, it is a separate program invoked by the compiler as the first part of translation. The language of preprocessor directives is only weakly related to the grammar of C, and so is sometimes used to process other kinds of text files. == Phases == Preprocessing is defined by the first four (of eight) ''phases of translation'' specified in the C Standard. # Trigraph replacement: The preprocessor replaces trigraph sequences with the characters they represent. # Line splicing: Physical source lines that are continued with escaped newline sequences are ''spliced'' to form logical lines. # Tokenization: The preprocessor breaks the result into ''preprocessing tokens'' and whitespace. It replaces comments with whitespace. # Macro expansion and directive handling: Preprocessing directive lines, including file inclusion and conditional compilation, are executed. The preprocessor simultaneously expands macros and, in the 1999 version of the C standard, handles _Pragma operators.抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「C preprocessor」の詳細全文を読む スポンサード リンク
|